

<div class="col-sm-12 mt20" >
<div class="panel panel-default">
<div class="panel-body">
<div class="col-sm-12">

    <div class="row">
        <div class="col-sm-2 text-right">
            <p class="form-control-static">下单时间</p>
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="start_time.date" is-open="start_time.opened"
                ng-click="open($event, start_time)" placeholder="下单开始时间" ng-required="true"  close-text="关闭" current-text="今天" clear-text="清除"  readonly/>
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="end_time.date" is-open="end_time.opened"
                ng-click="open($event, end_time)" placeholder="下单结束时间" ng-required="true" close-text="关闭" current-text="今天" clear-text="清除" readonly/>                      
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="searchform.title" placeholder="订单名称">
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="searchform.code" placeholder="订单编号"> 
        </div>

        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="searchform.mobile" placeholder="下单电话"> 
        </div>

        
    </div>

    <div class="row mt10">
        <div class="col-sm-2 text-right">
            <p class="form-control-static">出游时间</p>
        </div>

        <div class="col-sm-2">
            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="travel_time.date" is-open="travel_time.opened"
                ng-click="open($event, travel_time)" placeholder="出游时间" ng-required="true"  close-text="关闭" current-text="今天" clear-text="清除"  readonly/>
        </div>

        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="searchform.name" placeholder="下单姓名">
        </div>

        <div class="col-sm-2">  
            <ui-select ng-model="searchform.ticket_state" theme="bootstrap" ng-keyup="myKeyup($event)">
                <ui-select-match placeholder="出票状态">
                    {{$select.selected.label}}
                </ui-select-match>
                <ui-select-choices repeat="item.value as item in ticketstate_arr | filter: $select.search">
                    <span ng-bind-html="item.label | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>


        <div class="col-sm-2">  
            <ui-select ng-model="searchform.usedstate" theme="bootstrap" >
                <ui-select-match placeholder="订单状态">
                    {{$select.selected.label}}
                </ui-select-match>
                <ui-select-choices repeat="item.value as item in usedstatearr | filter: $select.search">
                    <span ng-bind-html="item.label | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>

        <!-- <div class="col-sm-2 pull-right">
            <button type="button" class="btn btn-default search btn-block" ng-click="exportToExcel('#Excel_table')">导出</button>
            <a id="dlink" download="{{ExcelName}}.xls" ng-show="false"></a>
        </div> -->

        <div class="col-sm-2 pull-right">
            <button class="btn btn-block btn-info" ng-click='load()'>搜索</button>
        </div>
        
        <!-- <div class="col-sm-2 pull-right">
            <button class="btn btn-block btn-warning" ng-click='signupinfo()'>报名信息</button> 
        </div> -->


    </div>

</div>
</div>
</div>
<!-- searchArea -->

<div class="panel panel-default">
    <div class="panel-body">
        <div class="table-responsive">
        <table class="table table-condensed table-hover table-bordered">
            <thead>
                <tr>
                    <th class="col-md-4 text-center">订单信息</th>
                    <th class="col-md-3 text-center">用户信息</th>
                    <!-- <th class="col-md-2 text-center">数量</th> -->
                    <th class="col-md-4 text-center">支付信息</th>
                    <th class="col-md-1 text-center">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="obj in objs">
                    <td class="">
                        订单名称：{{obj.title}}<br>
                        订单编号：{{obj.code}}<br>
                        <!-- 订单状态：
                        <span ng-if="obj.cancel_state == '0'"> 正常 </span>
                        <span ng-if="obj.cancel_state == '1'"> 
                            <span class="text-danger">订单已取消</span> <br>
                            取消时间：{{obj.cancel_time}} <br>
                            取消原因：{{obj.cancel_reason}} 
                        </span><br> -->
                        <span ng-if="obj.group != undefined"> 团期：{{obj.group}} </span>
                        <br>
                        购买数量：<span style="color: red;font-weight: 700;">{{obj.num}}</span> &nbsp;&nbsp;| &nbsp;&nbsp;
                        使用数量：<span style="color: red;font-weight: 700;">{{obj.used}}</span> &nbsp;&nbsp;| &nbsp;&nbsp;
                        退票数量：<span style="color: red;font-weight: 700;">{{obj.back}}</span>
                    </td>
                    <td class="">
                        <span ng-if="obj.name != undefined">下单姓名：{{obj.name}}</span><br>
                        电话：{{obj.mobile}}<br>
                        <span ng-if="obj.cardno != undefined && obj.cardno != ''">
                        身份证：{{obj.cardno}}<br></span>
                        时间：{{obj.create_time}}<br>
                        卖家备注：
                        <span ng-if="seller_remark_flag == 0"
                        >
                            <span class="text-danger">{{obj.seller_remark}}</span>
                            &nbsp;&nbsp;
                            <span
                            style="cursor: pointer;" 
                            ng-click="seller_remark_click(obj)"
                            class="glyphicon glyphicon-edit" aria-hidden="true"></span>
                        </span>

                        <span ng-if="seller_remark_flag == 1"
                        >
                            <div class="input-group input-group-sm" 
                            style="width: 100px; display: inline-flex;">
                              <input type="text" class="form-control" 
                              placeholder="卖家备注"
                              ng-model="obj.seller_remark"
                              >
                              <span class="input-group-btn">
                                <button class="btn btn-default" type="button"
                                ng-click="seller_remark_save(obj)"
                                >
                                    <span class="glyphicon glyphicon-ok"></span>
                                </button>
                                <button class="btn btn-default" type="button"
                                ng-click="seller_remark_cancel(obj)"
                                >
                                    <span class="glyphicon glyphicon-remove"></span>
                                </button>
                              </span>
                            </div><!-- /input-group -->
                        </span>

                    </td>
                    <!-- <td class="">
                        
                    </td> -->
                    <td class="">
                        交易金额：<span class="text-danger">{{obj.pay_fee}}</span><br>
                        支付状态：
                        <span ng-if="obj.pay_state == '1'">已支付<br>
                        出票状态：
                        <span ng-if="obj.ticket_state == '0'">未出票</span>
                        <span ng-if="obj.ticket_state == '1'">出票中</span>
                        <span ng-if="obj.ticket_state == '2'">出票完成</span>
                        <span ng-if="obj.ticket_state == '9'">出票失败</span>
                        <br>
                        支付时间：{{obj.pay_time}}<br>
                        交易号：{{obj.pay_trade_no}}
                        </span>
                        <span ng-if="obj.pay_state == '0'">未支付</span>


                    </td>
                    <td class="text-center">
                        <a ng-click="orderinfo(obj)" class="btn btn-primary btn-xs">订单详情</a>
                        <a ng-click="resend(obj)" class="btn btn-info btn-xs">重发短信</a>
                        
                    </td>
                </tr>
            </tbody>
        </table>
        </div>
        <div class="row">
        <div class="col-sm-3" ng-show='main==1'>
             <p class="form-control-static">共 {{bigTotalItems}} 条订单</p>
        </div>

        <div class="col-sm-9 text-right" ng-show='main==1'>
             <pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="load()" previous-text="上一页" next-text="下一页"
                first-text="首页" last-text="尾页" max-size="maxSize" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
                class="m-t-none m-b">
            </pagination>
        </div>
        </div>
    </div>
</div>

</div>